function submitDetail(){
		var url="../../listenQualityTestingDetail/addQualityTestingDetail.action";
		  var data={"detailText":$("#qualityTestingText").val(),"qtId":qtId};
		  $.post(url,data,function(mes){
			  if(mes>0){
				  window.parent.location.reload()
				  var index=parent.layer.getFrameIndex(window.name);
				  parent.layer.close(index);
			  }
		  },"json")
}

function input(obj,event){
	var keycode = String.fromCharCode(event.which); 
	var first=$(obj).val().substr(0,1);
	var noFs=/^[0-9]*$/;
	var id=$(obj).prop("id").split("_")[1]
	var sumNumber=$(obj).parent().parent().prev().children().html()
	 
	 
		if($(obj).val()==""){
			$(obj).val(0)
		}else{
			if(!noFs.test($(obj).val())){
				$(obj).val(0)
			}else{
				if(first==0){
					$(obj).val("")
					$(obj).val(keycode)
				}
			}
		}
		
		if(parseInt($(obj).val())>sumNumber){
			layer.msg("不能大于总数量")
			$(obj).val(0)
			$("#pass_"+id).html(100)
		}else{
			var yesNumber=parseInt(sumNumber)-parseInt($(obj).val())
			console.info(parseInt(yesNumber)/parseInt(sumNumber))
			var pass=(parseInt(yesNumber)/parseInt(sumNumber))*100
			$("#pass_"+id).html(pass)
		}
		layui.use('table',function(){
			  var table = layui.table;
			  var form = layui.form;
	    var qualityTestingTexts = new Array()
	    var qualityTestingTexts=$("#qualityTestingText").val().split("#");
		$("#qualityTestingText").val("")
		 
		for (var i = 0; i < qualityTestingTexts.length; i++) {
				if(qualityTestingTexts[i].split(",")[0]==id){
					var tr=$(obj).parents("tr");
					var nameTd=$(tr).children().children().get(1);
					var numberTd=$(tr).children().children().get(2);
					qualityTestingTexts[i]=id+","+$(nameTd).html()+","+$(numberTd).html()+","+$("#noNumber_"+id).val()+","+$("#pass_"+id).html()+"%"; 
					
				}
				if(qualityTestingTexts[i]){
					$("#qualityTestingText").val($("#qualityTestingText").val()+qualityTestingTexts[i]+"#")
				}
				
			}
 
	});
	 
}

